<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>recgames</title>
<%@ include file="/include/jqueryinclude.jsp" %>
<link rel="stylesheet" type="text/css" href="../style/layout.css" />
<link rel="stylesheet" href="../style/menu_style.css" type="text/css" />
<script type="text/javascript" src="../scripts/clock.js"></script>

</head>
<body onload="updateClock(); setInterval('updateClock()',1000)">
	<%@ include file="/include/header.jsp"%>
	<div id="mainContainer">
		<div id="mainContent">
		
			<div id="title">Active events</div>
			<c:forEach var="event" items="${ events }">
				<c:if test="${ event.deadlineHasPassed()==false }">
					<div id="eventContainer"  class="eventBox">
							<a href='showEvent.do?id=${event.getId()}'>${event.getEventName()}<span style="position:absolute; width:100%; height:100%; top:0; left: 0; z-index: 1"></span></a>
							( ${event.getStatus()} )<br/>
							${event.getDescription() } <br/><br/>
							Participants: ${event.getNumberOfSignedUpUsers()} <c:if test='${event.hasMaxCapacity()}'>/${event.getMaxCapacity() }</c:if><br/>
							Deadline: <span style="color:red;">${event.getDeadline() }</span>
					</div>
				</c:if>
			</c:forEach>
		</div>
		<%@ include file="/include/menu.jsp"%>
	</div>
	<script
		src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
	<script src="../scripts/script.js"></script>
</body>
</html>